package com.common.web.event;

import java.util.List;
import java.util.function.Consumer;

import org.springframework.context.ApplicationEvent;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 获取数据集合命令
 */
@Data
@EqualsAndHashCode(callSuper=false)
public class GetDatasEvent<T> extends ApplicationEvent {

	private static final long serialVersionUID = 1L;
	
	private String plcName;
	
	private List<String> addressList;
	
	private boolean logFlag;
	
	private Consumer<List<T>> callBack;
	
	private Class<T> type;
	
	public GetDatasEvent(String plcName,List<String> addressList,boolean logFlag,Consumer<List<T>> callBack,Class<T> type) {
		super(addressList);
		this.plcName = plcName;
		this.addressList = addressList;
		this.logFlag=logFlag;
		this.callBack = callBack;
		this.type = type;
	}
}
